package com.bsb.biz.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.bsb.base.mapper.BsbTaxrateMapper;
import com.bsb.base.model.BsbTaxrate;
import com.bsb.base.model.BsbTaxrateExample;

@Service
public class BsbTaxrateService{
	
	@Resource
	private BsbTaxrateMapper bsbTaxrateMapper;
	
	public void addBsbTaxrate(BsbTaxrate bsbTaxrate) {
		bsbTaxrateMapper.insertSelective(bsbTaxrate);
	}
	
	public void delBsbTaxrateById(Integer id) {
		bsbTaxrateMapper.deleteByPrimaryKey(id);
	}
	
	public void updateBsbTaxrate(BsbTaxrate bsbTaxrate) {
		bsbTaxrateMapper.updateByPrimaryKeySelective(bsbTaxrate);
	}
	
	public void updateBsbTaxrateByExample(BsbTaxrate bsbTaxrate,BsbTaxrateExample bsbTaxrateExample){
	    bsbTaxrateMapper.updateByExampleSelective(bsbTaxrate,bsbTaxrateExample);
	}
	
	public BsbTaxrate getBsbTaxrateById(Integer id) {
		return bsbTaxrateMapper.selectByPrimaryKey(id);
	}
	
	public List<BsbTaxrate> getPageBsbTaxrate(BsbTaxrateExample bsbTaxrateExample) {
		return bsbTaxrateMapper.selectPage(bsbTaxrateExample);
	}
	
	public int countBsbTaxrate(BsbTaxrateExample bsbTaxrateExample) {
		return bsbTaxrateMapper.countByExample(bsbTaxrateExample);
	}
	
	public List<BsbTaxrate> selectByExample(BsbTaxrateExample example){
	    return bsbTaxrateMapper.selectByExample(example);
	}
}
